/**
 * 主页js
 */


if(location.href=="http://mpa.jl.gov.cn/" || location.href=="http://mpa.jl.gov.cn/index.html"){
//首页


	// 总计时器，保证目标加载完毕再执行js（轮播+国内动态+国务院[iframe]）
	_EsdDynamicTransformationScript.intervalMpa = setInterval(function(){
		
		if( ( $("#Projector .picplay .picbox:eq(4) a:eq(0)") != undefined ) 
				&& ( $(".conFlour1 .gndt .tabBoxList:eq(2) ul li:eq(0) a") != undefined ) 
				&& ( $("#provinceBox a:last") != undefined )  ){
			clearInterval(_EsdDynamicTransformationScript.intervalMpa);
			
			part_First();
			part_Second();
			part_Third();
			
		}
		
	}, 500);

	
	
	var part_Second = function(){
//第二部分


	//各个选项名称对应的内容数量
	_EsdDynamicTransformationScript.num6 = $(".conFlour1 .gndt .tabBoxList:eq(0) ul li").length-1;
	_EsdDynamicTransformationScript.num7 = $(".conFlour1 .gndt .tabBoxList:eq(1) ul li").length-1;
	_EsdDynamicTransformationScript.num8 = $(".conFlour1 .gndt .tabBoxList:eq(2) ul li").length-1;
	
	//各个选项名称
	_EsdDynamicTransformationScript.esdTagNum1 = $(".conFlour1 .gndt .title1 ul li:eq(0) a");
	_EsdDynamicTransformationScript.esdTagNum2 = $(".conFlour1 .gndt .title1 ul li:eq(1) a");
	_EsdDynamicTransformationScript.esdTagNum3 = $(".conFlour1 .gndt .title1 ul li:eq(2) a");
	
	//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esdTagNum1Content1 = $(".conFlour1 .gndt .tabBoxList:eq(0) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esdTagNum2Content1 = $(".conFlour1 .gndt .tabBoxList:eq(1) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esdTagNum3Content1 = $(".conFlour1 .gndt .tabBoxList:eq(2) ul li:eq(0) a");
	
	//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esdTagNum1ContentN = $(".conFlour1 .gndt .tabBoxList:eq(0) ul li:eq("+_EsdDynamicTransformationScript.num6+") a");
	_EsdDynamicTransformationScript.esdTagNum2ContentN = $(".conFlour1 .gndt .tabBoxList:eq(1) ul li:eq("+_EsdDynamicTransformationScript.num7+") a");
	_EsdDynamicTransformationScript.esdTagNum3ContentN = $(".conFlour1 .gndt .tabBoxList:eq(2) ul li:eq("+_EsdDynamicTransformationScript.num8+") a");
	
	//第一块
	_EsdDynamicTransformationScript.esdTagNum1.focus(function (e) {
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
//				_EsdDynamicTransformationScript.esdTagNum1Content1.focus();
				//ie测试有问题。用选择器写
				$(".conFlour1 .gndt .tabBoxList:eq(0) ul li:eq(0) a").focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum1.blur(function () {
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esdTagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum1.focus();
				return false;
			}else if (e.keyCode == 9) {
				
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esdTagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum2.mouseover();
				_EsdDynamicTransformationScript.esdTagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	//第二块
	_EsdDynamicTransformationScript.esdTagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdTagNum1.mouseover();
				_EsdDynamicTransformationScript.esdTagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum2Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

	_EsdDynamicTransformationScript.esdTagNum2Content1.focus(function () {
		$(this).bind("keydown.keydown_s2", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum2Content1.blur(function () {
		$(this).unbind("keydown.keydown_s2");
	});

	_EsdDynamicTransformationScript.esdTagNum2ContentN.focus(function () {
		$(this).bind("keydown.keydown_e2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum3.mouseover();
				_EsdDynamicTransformationScript.esdTagNum3.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum2ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e2");
	});
	
	//第三块
	_EsdDynamicTransformationScript.esdTagNum3.focus(function (e) {
		$(this).bind("keydown.keydown_3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esdTagNum2.mouseover();
				_EsdDynamicTransformationScript.esdTagNum2ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esdTagNum3Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esdTagNum3.blur(function () {
		$(this).unbind("keydown.keydown_3");
	});

	}
	
//第三部分
	//二层  

	//各个选项名称对应的内容数量
	_EsdDynamicTransformationScript.num10 = $(".conFlour3 .tzwj .tabBoxList:eq(0) ul li").length-1;
	_EsdDynamicTransformationScript.num11 = $(".conFlour3 .tzwj .tabBoxList:eq(1) ul li").length-1;
	
	//各个选项名称
	_EsdDynamicTransformationScript.esd2TagNum1 = $(".conFlour3 .tzwj .title2 ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd2TagNum2 = $(".conFlour3 .tzwj .title2 ul li:eq(1) a");
	
	//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd2TagNum1Content1 = $(".conFlour3 .tzwj .tabBoxList:eq(0) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd2TagNum2Content1 = $(".conFlour3 .tzwj .tabBoxList:eq(1) ul li:eq(0) a");
	
	//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd2TagNum1ContentN = $(".conFlour3 .tzwj .tabBoxList:eq(0) ul li:eq("+_EsdDynamicTransformationScript.num10+") a");
	_EsdDynamicTransformationScript.esd2TagNum2ContentN = $(".conFlour3 .tzwj .tabBoxList:eq(1) ul li:eq("+_EsdDynamicTransformationScript.num11+") a");
	
	//第一块
	_EsdDynamicTransformationScript.esd2TagNum1.focus(function (e) {
		
		e = $(this).mouseover();
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum1Content1.focus();
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esd2TagNum1.blur(function () {
		
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esd2TagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd2TagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	
	//第二块
	_EsdDynamicTransformationScript.esd2TagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd2TagNum1.mouseover();
				_EsdDynamicTransformationScript.esd2TagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd2TagNum2Content1.focus();
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esd2TagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

//第四部分

	
	//各个选项名称对应的内容数量
	_EsdDynamicTransformationScript.num12 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(0) ul li").length-1;
	_EsdDynamicTransformationScript.num13 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(1) ul li").length-1;
	_EsdDynamicTransformationScript.num14 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(2) ul li").length-1;
	_EsdDynamicTransformationScript.num15 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(3) ul li").length-1;
	
	//各个选项名称
	_EsdDynamicTransformationScript.esd4TagNum1 = $(".conFlour6 .conFlour6R .wsbsdtBox .title ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd4TagNum2 = $(".conFlour6 .conFlour6R .wsbsdtBox .title ul li:eq(1) a");
	_EsdDynamicTransformationScript.esd4TagNum3 = $(".conFlour6 .conFlour6R .wsbsdtBox .title ul li:eq(2) a");
	_EsdDynamicTransformationScript.esd4TagNum4 = $(".conFlour6 .conFlour6R .wsbsdtBox .title ul li:eq(3) a");
	
	//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd4TagNum1Content1 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(0) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd4TagNum2Content1 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(1) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd4TagNum3Content1 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(2) ul li:eq(0) a");
	_EsdDynamicTransformationScript.esd4TagNum4Content1 = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(3) ul li:eq(0) a");
	
	//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd4TagNum1ContentN = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(0) ul li:eq("+_EsdDynamicTransformationScript.num12+") a");
	_EsdDynamicTransformationScript.esd4TagNum2ContentN = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(1) ul li:eq("+_EsdDynamicTransformationScript.num13+") a");
	_EsdDynamicTransformationScript.esd4TagNum3ContentN = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(2) ul li:eq("+_EsdDynamicTransformationScript.num14+") a");
	_EsdDynamicTransformationScript.esd4TagNum4ContentN = $(".conFlour6 .conFlour6R .wsbsdtBox .tabBoxList:eq(3) ul li:eq("+_EsdDynamicTransformationScript.num15+") a");
	
	//第一块
	_EsdDynamicTransformationScript.esd4TagNum1.focus(function (e) {
		e = $(this).mouseover();
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum1Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum1.blur(function () {
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esd4TagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esd4TagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	//第二块
	_EsdDynamicTransformationScript.esd4TagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd4TagNum1.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum2Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

	_EsdDynamicTransformationScript.esd4TagNum2Content1.focus(function () {
		$(this).bind("keydown.keydown_s2", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum2Content1.blur(function () {
		$(this).unbind("keydown.keydown_s2");
	});

	_EsdDynamicTransformationScript.esd4TagNum2ContentN.focus(function () {
		$(this).bind("keydown.keydown_e2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum3.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum3.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum2ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e2");
	});
	
	//第三块
	_EsdDynamicTransformationScript.esd4TagNum3.focus(function (e) {
		$(this).bind("keydown.keydown_3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd4TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum2ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum3Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum3.blur(function () {
		$(this).unbind("keydown.keydown_3");
	});

	_EsdDynamicTransformationScript.esd4TagNum3Content1.focus(function () {
		$(this).bind("keydown.keydown_s3", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum3.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum3Content1.blur(function () {
		$(this).unbind("keydown.keydown_s3");
	});

	_EsdDynamicTransformationScript.esd4TagNum3ContentN.focus(function () {
		$(this).bind("keydown.keydown_e3", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum4.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum4.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum3ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e3");
	});
	
	//第四块
	_EsdDynamicTransformationScript.esd4TagNum4.focus(function (e) {
		$(this).bind("keydown.keydown_4", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd4TagNum3.mouseover();
				_EsdDynamicTransformationScript.esd4TagNum3ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd4TagNum4Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd4TagNum4.blur(function () {
		$(this).unbind("keydown.keydown_4");
	});

	


	var part_Third = function(){
	
//第五部分---国务院

	//各个选项名称
	_EsdDynamicTransformationScript.esd5TagNum1 = $(".conFlour3 .zyzcxx .title3 .title4 li:eq(0) a");
	_EsdDynamicTransformationScript.esd5TagNum2 = $(".conFlour3 .zyzcxx .title3 .title4 li:eq(1) a");
	
	//各个选项中的第一个内容
	_EsdDynamicTransformationScript.esd5TagNum1Content1 = $("#countryBox a:first");
	_EsdDynamicTransformationScript.esd5TagNum2Content1 = $("#provinceBox a:first");
	
	//各个选项中的最后一个内容
	_EsdDynamicTransformationScript.esd5TagNum1ContentN = $("#countryBox a:last");
	_EsdDynamicTransformationScript.esd5TagNum2ContentN = $("#provinceBox a:last");
	
	//第一块
	_EsdDynamicTransformationScript.esd5TagNum1.focus(function (e) {
		$(this).bind("keydown.keydown_1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				$(".conFlour3 .tzwj .title ul li:eq(1) a").mouseover();
				$(".conFlour3 .tzwj a").last().focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd5TagNum1Content1.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd5TagNum1.blur(function () {
		$(this).unbind("keydown.keydown_1");
	});

	_EsdDynamicTransformationScript.esd5TagNum1Content1.focus(function () {
		$(this).bind("keydown.keydown_s1", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd5TagNum1.focus();
				return false;
			}else if (e.keyCode == 9) {
				
			}
		});
	});
	_EsdDynamicTransformationScript.esd5TagNum1Content1.blur(function () {
		$(this).unbind("keydown.keydown_s1");
	});

	_EsdDynamicTransformationScript.esd5TagNum1ContentN.focus(function () {
		$(this).bind("keydown.keydown_e1", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				$("#countryBox a:eq(4)").focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd5TagNum2.mouseover();
				_EsdDynamicTransformationScript.esd5TagNum2.focus();
				return false;
			}
		});
	});
	_EsdDynamicTransformationScript.esd5TagNum1ContentN.blur(function () {
		$(this).unbind("keydown.keydown_e1");
	});
	
	//第二块
	_EsdDynamicTransformationScript.esd5TagNum2.focus(function (e) {
		$(this).bind("keydown.keydown_2", function (e) {
			if(e.shiftKey&&e.keyCode==9){
				_EsdDynamicTransformationScript.esd5TagNum1.mouseover();
				_EsdDynamicTransformationScript.esd5TagNum1ContentN.focus();
				return false;
			}else if (e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd5TagNum2Content1.focus();
				return false;
			}
		});

	});
	_EsdDynamicTransformationScript.esd5TagNum2.blur(function () {
		$(this).unbind("keydown.keydown_2");
	});

	_EsdDynamicTransformationScript.esd5TagNum2Content1.focus(function () {
		$(this).bind("keydown.keydown_s2", function (e) {
			if (e.shiftKey && e.keyCode == 9) {
				_EsdDynamicTransformationScript.esd5TagNum2.focus();
				return false;
			}else if (e.keyCode == 9) {
				
			}
		});
	});
	_EsdDynamicTransformationScript.esd5TagNum2Content1.blur(function () {
		$(this).unbind("keydown.keydown_s2");
	});
	
	
	}

//首页结束	
}






